<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    var w = 1, z = 2;
    function foo(x = w + 1, y = x + 1, z = z + 1) {
        console.log(x, y, z)
    }
    // z + 1中发现z是一个未初始化的参数变量，所以不会在外层寻找
    foo()   //Uncaught ReferenceError: Cannot access 'z' before initialization
</script>

</html>